a = ['i','love','you']

class Stack:
    def __init__(self,nr):
        self.nr = nr

    def isEmpty(self):
        if not len(self.nr ):
            return True
        else:
            return False
    def push(self,t):
        for i in sorted(t,reverse = True):
            self.nr.insert(0,i)

    def pop(self):
        if not self.nr:
            print('警告！这是空栈')
        else:
            self.nr.pop()
    def top(self):
        if not self.nr:
            print('警告！这是空栈')
        else:
            print(self.nr[0])
    def bottom(self):
        if not self.nr:
            print('警告！这是空栈')
        else:
            print(self.nr[-1])
    def print(self):
        if not self.nr:
            print('警告！这是空栈')
        else:
            print(self.nr)

c= ['not','yes']
b=Stack(a)
b.push(c)
